package com.anlogic.sdk.bootimage;

import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

public class Activator extends AbstractUIPlugin {
	public static final String PLUGIN_ID = "com.anlogic.sdk.bootimage";

	private static Activator plugin;

	public void start(BundleContext context) throws Exception {
		super.start(context);
		plugin = this;
	}

	public void stop(BundleContext context) throws Exception {
		plugin = null;
		super.stop(context);
	}

	public static Activator getDefault() {
		return plugin;
	}

	protected void initializeDefaultPreferences(IPreferenceStore store) {
		store.setDefault("bootimage.script.name.pref", "bootgen");
	}

	public static String getBootgenCommand() {
		return getDefault().getPreferenceStore().getString("bootimage.script.name.pref");
	}
}
